home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club (Business) 1997 July / Software of the Month Club - Business (Volume 239) (July 1997).iso / pc / code / shared.dxr / 04469_STARTMOVIE.ls < prev    next >
Encoding:
Text File  |  1996-02-21  |  2.9 KB  |  96 lines

  1. global gObjectsA, gObjectsB, gObjectsC, gObjectsD, gObjectsE, gObjectsF, gObjectsG, gObjectsH, gWorld, gStates, gOBJECTS, gHotRects, gScreenState, gCursorList, gTimerList, gHitMaps, gPuppetlines, gKeyRef, cNullCast, cNullQTmovie, NULLRECT, gSpritePropTypes, gQTproplist, cNUllCharmovie, sPICTSPRITE, sQTSPRITE, sCURSORSPRITE, sCPSprite, sQTCharSprite, gUnvObjects, void, gAngles, gLastCursor, gPlayingQT, gCursorPresent, gScreenWidth, gScreenHeight, gCurKeyList, gTransMovieName, gAnimationObjects, gDeathRow, gLastKeyList, gKeyFrameSound, gEnvironmentSound, gKeyFrameSoundMode, gKeyExitSound, gHaveNavs, gNextEnvLetter, gNextDIRFile, gMIDIPlayTRUE, gInitalized, noteObjs, windowsMIDIXObj, xNAVXOBJ, xCURXOBJ, gCPU, gfileSep, gRootPath, gHDpath, gXobjs, gXOBJPath, gCDpath, gCDName, gQTmovPath, gSoundPath, gdirtyGame
  2.  
  3. on InitUnCompiledOBJs
  4.   initEnvironment()
  5.   InitUnvObjs()
  6.   InitEnviromentObjects()
  7. end
  8.  
  9. on startMovie
  10.   global noav
  11.   cursor([the number of cast "NullCursor", the number of cast "NullCursor.mask"])
  12.   updateStage()
  13.   if the movieName starts "intro" then
  14.     if gInitalized <> #true then
  15.       StartUpInitalizations()
  16.     end if
  17.     if gCPU = #MAC then
  18.       go("loadgameNow")
  19.     end if
  20.   else
  21.     if gInitalized <> #true then
  22.       StartUpInitalizations()
  23.       OneTimeInitalizations()
  24.     end if
  25.     set gPlayingQT to 0
  26.     set gNextDIRFile to #empty
  27.     setaProp(gStates, #EnviroLetter, char 1 of the movieName)
  28.     puppetScore()
  29.     set the cpuHogTicks to 60 * 60 * 1
  30.     SetPathsforEnviro(getaProp(gStates, #EnviroLetter))
  31.   end if
  32. end
  33.  
  34. on puppetScore
  35.   repeat with sNum = 1 to 48
  36.     puppetSprite(sNum, 1)
  37.   end repeat
  38. end
  39.  
  40. on DoQuit
  41.   if objectp(xNAVXOBJ) then
  42.     xNAVXOBJ(mdispose)
  43.   end if
  44.   CLOSEMIDIXOBJ()
  45. end
  46.  
  47. on TicksDelay nticks
  48.   set Start to the ticks
  49.   repeat while the ticks < (Start + nticks)
  50.   end repeat
  51. end
  52.  
  53. on onOffScreenCursor onscreen
  54.   if onscreen then
  55.     SetCursor(the mouseH, the mouseV)
  56.   else
  57.     set gLastCursor to 200
  58.     cursor(200)
  59.   end if
  60. end
  61.  
  62. on makeDynamic ObjRef, thisProp, thisValue
  63.   setaProp(getaProp(gOBJECTS, ObjRef), thisProp, thisValue)
  64.   if voidp(getaProp(getaProp(gOBJECTS, ObjRef), #Dynamic)) then
  65.     setaProp(getaProp(gOBJECTS, ObjRef), #Dynamic, [])
  66.   end if
  67.   if getOne(getaProp(gStates, #Dynamic), ObjRef) = 0 then
  68.     add(getaProp(gStates, #Dynamic), ObjRef)
  69.   end if
  70.   if getOne(getaProp(getaProp(gOBJECTS, ObjRef), #Dynamic), thisProp) = 0 then
  71.     add(getaProp(getaProp(gOBJECTS, ObjRef), #Dynamic), thisProp)
  72.   end if
  73.   set gdirtyGame to 1
  74. end
  75.  
  76. on object refnum
  77.   return getaProp(gOBJECTS, refnum)
  78. end
  79.  
  80. on GameOverEnter
  81.   set Deletelist to []
  82.   repeat with ObjRef in gUnvObjects
  83.     set obj to getaProp(gOBJECTS, ObjRef)
  84.     if (getaProp(obj, #Aquired) = #true) and (ObjRef <> #SaveOBj) then
  85.       setaProp(obj, #Aquired, #false)
  86.       add(Deletelist, ObjRef)
  87.     end if
  88.   end repeat
  89.   Delobjects(Deletelist)
  90. end
  91.  
  92. on patchPalette
  93.   global gFixPalette
  94.   gFixPalette(mPatchIt)
  95. end
  96.